home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / std_unix / archive / text0035.txt < prev    next >
Encoding:
Text File  |  1993-07-06  |  781 b   |  23 lines

  1. Submitted-by: karish@mindcraft.com (Chuck Karish)
  2.  
  3. conklin@kaleida.com (J.T. Conklin) asked:
  4. >Since expr will coerce a string into an interger in other contexts, I
  5. >am wondering if a string like 0000 should be interpreted as zero?  All
  6. >of the implementations (that worked at all) I've tried do not.
  7. >I've patched the broken versions (386BSD & GNU) to the traditional
  8. >behavior, but I'm curious to know if the traditional behavior is
  9. >actually incorrect.
  10.  
  11. In P1003.2 Draft 11, the entry for expr (4.22.7, page 401) defines "integer"
  12. as "An argument consisting only of an (optional) unary minus followed by
  13. digits."
  14.  
  15. By this definition, "0000" is an integer.
  16.  
  17. --
  18. Chuck Karish        karish@mindcraft.com
  19. Mindcraft, Inc.     (415) 323-9000 x117
  20.  
  21. Volume-Number: Volume 31, Number 38
  22.  
  23.